package demo.spring.remote.client;

import demo.spring.remote.server.Account;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

/**
 * Created by lushun.chen on 2017/3/25.
 *
 * @author lushun.chen
 */
public class Main {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context =
                new ClassPathXmlApplicationContext("services.xml");
        context.start();
        SimpleObject simpleObject = context.getBean("simpleObject", SimpleObject.class);
        List<Account> account = simpleObject.demo("张三");
        for (Account account1 : account) {
            System.out.println(account1.getName());
        }
    }
}
